#ifndef _CALL_STACKDLG_H_
#define _CALL_STACKDLG_H_

struct call_stackdlg;

/* call_stackdlg_new: Create a new file dialog.
 * ____________
 *
 *   pos_r:   position of the viewer (row)
 *   pos_c:   position of the viewer (column)
 *   height:  height (in lines) of the viewer
 *   width:   width (in columns) of the viewer
 *
 * return value:  a new call_stackdlg object on success, null on failure.
 */
struct call_stackdlg *call_stackdlg_new(int pos_r, int pos_c, int height, int width);

/* call_stackdlg_free:  Release the memory associated with a file dialog.
 * ------------
 *
 *   fdlg:  The file dialog to free.
 */
void call_stackdlg_free(struct call_stackdlg *c_stdlg);

/* call_stackdlg_add_file_choice:  Add a file to the list of source files.
 * -----------
 *
 * file_choice: A path to a file that the user will be able to choose from.
 *
 * Return Value:  Zero on success, non-zero on error.
 */
int call_stackdlg_add_method(struct call_stackdlg *c_stdlg, const char *methods);

/* call_stackdlg_clear: Clears all the file_choice's in the dialog.
 * ______________
 */
void call_stackdlg_clear(struct call_stackdlg *c_stdlg);

/* call_stackdlg_recv_char: Sens a character to the call_stackdlg.
 *
 *   fdlg:  The file dialog to free.
 *   key :  The next key of input to process
 *   file:  The file the user selected
 *
 *  returns -1 when aborted by user.
 *  returns 0 when needs more input
 *  returns 1 when done ( file is valid )
 */
int call_stackdlg_recv_char(struct call_stackdlg *c_stdlg, int key, char *method);

/* call_stackdlg_display_message: Displays a message on the call_stackdlg window status bar.
 * ------------------------
 *
 * fd:      The file dialog to use.
 * message: The message to display
 */
void call_stackdlg_display_message(struct call_stackdlg *c_stdlg, char *message);

/* call_stackdlg_display: Redraws the file dialog.
 *
 * Returns 0 on success or -1 on error
 */
int call_stackdlg_display( struct call_stackdlg *c_stdlg, bool is_in_focus);

#endif /* _CALL_STACKDLG_H_*/
